<template>
	<div class="components-container quhui"  style="margin:0;background:#0B0B39;position:fixed;width:100%;height:100%;top:0;">
        <h1 style="text-align:center;color:#F79709;font-size:70px;font-weight:bold;">
          {{name}}取灰等待窗口
        </h1>
        <el-table ref="dialog" class="lala" :data="dataList" style="width: 100%;" :row-class-name="delStatu" :row-style="tableRowClassName" :header-cell-style="nihao" :show-header="true" slot="append">
          <!-- <el-table-column prop="REGBUSNUM" label="业务编号"  align="center"></el-table-column> -->
          <!-- <el-table-column prop="REGNAME" label="逝者姓名" align="center" ></el-table-column> -->
          <!-- <el-table-column type="index" width="200"></el-table-column> -->
          
          <!-- <el-table-column type="index" label="序号"  align="center" width='300px'></el-table-column> -->
          <el-table-column prop="TSHDESC" label="取灰描述"  align="left" :show-overflow-tooltip="true"></el-table-column>
          <div slot="empty" style="width:100%;background: #0B0B39;">
            <p :style="{'marginTop': '23px','color':'#F79709'}">暂无数据</p>
          </div>
        </el-table>
        <!-- <audio ref="voiceads">
          <source id="voiceSr" :src=this.voicebbUrl type="audio/mpeg">
          <embed id="voiceEd" height="0" width="0" src='voicebbUrl'>
        </audio> -->
        <!-- <el-button @click="sound">默认按钮</el-button> -->
        <!-- <el-button type="primary" @click="refreshData">主要按钮</el-button> -->
  </div>
</template>

<style rel="stylesheet/scss" lang="scss">
@import "src/styles/common.scss";
.quhui .components-container .el-table_1_column_1 {
  border-bottom: none!important;
}
.quhui .components-container .el-table_1_column_2 {
  border-bottom: none!important;
}
.quhui .lala::before{
  height: 0px;
}
.quhui .lala .el-table__body-wrapper .el-table__empty-block{
  background:#0B0B39;
  height: 110px;
}
.quhui .el-table .delstatu{
  background: rgb(11, 11, 57);
}
.quhui .el-table .el-table__body .delstatu:hover>td{
  background: rgb(11, 11, 57)!important;
}
</style>
<script>
import apiBase from "@/api/apiBase.js";
import { formatDate, timeStringToDate } from "@/utils/date.js";
import { manage } from "@/mixins/managePage.js";
// import fontSize from "/static/js/apiadress"

export default {
  name: "pendAshSearch",
  mixins: [manage],
  data() {
    return {
      selectData: {
        TshaddGreaterAndEquals: null
        //TshtakGreaterAndEquals: null
      },
      documentwidth:null,
      empty:'1212',
      zhText: null,
      voicebbUrl: null,
      fontSize: null,
      rowNum: null,
      rowHeight: null,
      marginLeft: null,
      name: null,
      RefreshTime: null,
    };
  },
  methods: {
    tableRowClassName(row, index) {
      // #EEEE00
      return {"background-color":"#0B0B39","height":this.rowHeight,"color":"#F79709"};
    },
    nihao(row, index) {
      return {"background-color":"#0B0B39","height":'120px',"color":"#F79709"};
    },
    refreshData() {
      this.getData();
    },
    delStatu({row,rowIndex}){
      if(row){
        return "delstatu"
      }else{
        return '';
      }
    },
    //取灰查询
    getData() {
      
      let data = {
        PageIndex: 1,
        PageSize: 1000,
        OrderBy: this.pageOrder.orderType,
        OrderByType: this.pageOrder.orderSort,
        Data: JSON.parse(JSON.stringify(this.selectData))
      };
      apiBase.DoService(
        data,
        apiBase.getApiAdress().Takeash.QueryTakeash,
        res => {
          if(res.data.content.OutData.length > this.rowNum){
            this.dataList = res.data.content.OutData.slice(0,this.rowNum);
          }else{
            this.dataList = res.data.content.OutData;
          }
        },
        res => {
          this.$message.error(res.data.msg);
        }
      );
    },
  },
  components: {},
  mounted(){
    document.querySelector(".lala").style.fontSize = this.fontSize;
    document.querySelector(".lala").style.marginLeft = this.marginLeft;
  },
  created() {
    this.fontSize = fontSize();
    this.rowNum = rowNum();
    this.rowHeight = rowHeight();
    this.marginLeft = marginLeft();
    this.RefreshTime = RefreshTime();
    this.name = localStorage.getItem("orgname");

    this.selectData.TshaddGreaterAndEquals = formatDate(new Date(), "yyyyMMdd");
    setInterval(function(){
      location.reload()
    },this.RefreshTime);  
    this.getData();
  }
};
</script>

